public class O14 {
    public static void main(String[] args) {
        O14 o = new O14();
        System.out.println(o.cuttingRope(10));
    }
    public int cuttingRope(int n) {
        int max = 0,tag = 1;
        while (true){
            if (tag>n)
                break;
            int temp = (int) Math.pow(n/tag,tag-1);
            temp*=n/tag+n%tag;
            max = Math.max(max,temp);
            int er = (int)Math.pow((n/(tag)+1),(tag-1));
            if ((n/(tag)+1)*(tag-1)<n){
                max = Math.max(max,er*(n%((n/(tag)+1))));
            }
            tag++;
        }
        return max;
    }
}
